package com.example.demo.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 系统日志实体类
 */
@Data
@TableName(value = "sys_demo")
public class SysLog extends Model<SysLog> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value="日志id",name="id",required=true)
    @TableId(value="id")
    private Integer id;

    @ApiModelProperty(value="请求URL",name="url",required=true)
    @TableField(value="url")
    private String url;

    @ApiModelProperty(value="请求ip",name="ip",required=true)
    @TableField(value="ip")
    private String ip;

    @ApiModelProperty(value="类名",name="className",required=true)
    @TableField(value="class_name")
    private String className;

    @ApiModelProperty(value="方法名",name="methodName",required=true)
    @TableField(value="method_name")
    private String methodName;

    @ApiModelProperty(value="请求参数",name="params",required=true)
    @TableField(value="params")
    private String params;

    @ApiModelProperty(value="执行时间",name="exeuTime",required=true)
    @TableField(value="exeu_time")
    private Long exeuTime;

    @ApiModelProperty(value="注解备注",name="remark",required=true)
    @TableField(value="remark")
    private String remark;

    @ApiModelProperty(value="添加时间",name="createDate",required=true)
    @TableField(value="create_date")
    private String createDate;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
